#include "my_task.h"

#include "main.h"
#include "stdlib.h"




//temp test
uint8_t pcWriteBuffer[500];
/// @brief 串口打印所有任务信息
/// @param param 
void ShowTaskInfo(double param)
{
    vTaskList((char*)&pcWriteBuffer);
    printf("任务名      任务状态 优先级   剩余栈 任务序号\r\n");
    printf("%s\r\n", pcWriteBuffer);  
}



void ShuMeiPiRst(double param)
{
    MY_LOGI("SM pi", "task exit");
    uint8_t tr = '5';
}




/// @brief 测试任务
/// @param param 
void TestTask(void* param)
{
    //注册任务信息打印命令
    CmdRegister("TASK",
                "show all task infor",
                ShowTaskInfo);

    //树莓派任务退出
    CmdRegister("SMPI",
                "SM Pi exit current task",
                ShuMeiPiRst);


    while(1)
    {
        // StepMotorTest();
        vTaskDelay(2000);
    }
}





